<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // <!-- 1. prompt  用户输入框 -->
      let num = +prompt("请输入您需要换算的数字");
      function shijian(time = 0) {
        let h = parseInt((time / 60 / 60) % 24);
        let m = parseInt((time / 60) % 60);
        let s = parseInt(time % 60);
        h = h < 10 ? +"0" : h;
        m = m < 10 ? +"0" : m;
        s = s < 10 ? +"0" : s;
        alert(`转换之后的时间是${h}小时${m}分钟${s}m秒`)

      }
      shijian(num)
    </script>
  </body>
</html>
